<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>新建套餐</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script src="${ctx}/rs/js/jquery.validate.min.js"></script>
<script src="${ctx}/rs/js/jquery.form.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8"
    src="${ctx}/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8"
    src="${ctx}/ueditor/ueditor.all.min.js">
    
</script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8"
    src="${ctx}/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" charset="utf-8"
    src="${ctx}/ueditor/third-party/9fm/9fm.v1.js"></script>
</head>
<body>
<form id="form1" class="form-horizontal" action="${ctx}/message/save.htm" method="post">
      <div class="form-group">
        <label for="name" class="col-sm-2 control-label item ">投放时间：</label>
        <div class="col-sm-8  ">
          <input type="text" class="form-control " id="postDate" name="comboTitle" value= "${Plan.postDate}"/>
        </div>
      </div>

      <div class="form-group">
        <label for="name" class="col-sm-2 control-label item ">投放区域：</label>
        <div class="col-sm-8  ">
          <input type="text" class="form-control " id="postDate" name="comboTitle" value= "${Plan.postArea}"/>
<!--             <img id="banimg1" class="banimg1" width="100" height="100" src="${Plan.postDate}"/> -->
<!--             <input type="button" value="查看大图" style="vertical-align: bottom;" onclick="divshow(banimg1)"/> -->
        </div>
      </div>
      
      <div class="form-group">
        <label for="name" class="col-sm-2 control-label item ">产品类型：</label>
        <div class="col-sm-8  ">
          <input class="form-control"  id="comboAbstract" name="comboAbstract" value="${Plan.productType}" />
        </div>
      </div>
      
       <div class="form-group" id="divContent" >
           <label for="name" class="col-sm-2 control-label item wid1">投放预算：</label>
           <div class="col-sm-8 wid2">
               <input class="form-control " id = "comboIntroduce"  value="${ Plan.postBudget }"/>
               <div id="errmsg"></div>
           </div>
       </div>
       <div class="form-group" id="divContent" >
           <label for="name" class="col-sm-2 control-label item wid1">节目偏好：</label>
           <div class="col-sm-8 wid2">
               <input class="form-control"  id = "comboIntroduce" value="${ Plan.showInterest }">
               <div id="errmsg"></div>
           </div>
       </div>
       <div class="form-group" id="divContent" >
           <label for="name" class="col-sm-2 control-label item wid1">备注：</label>
           <div class="col-sm-8 wid2">
               <input class="form-control " id = "comboIntroduce" value="${ Plan.remark }" >
               <div id="errmsg"></div>
           </div>
       </div>
       <div class="form-group" id="divContent" >
           <label for="name" class="col-sm-2 control-label item wid1">联系人：</label>
           <div class="col-sm-8 wid2">
               <input class="form-control " id = "comboIntroduce"  value="${ Plan.contactMan }"/>
               <div id="errmsg"></div>
           </div>
       </div>
       <div class="form-group" id="divContent" >
           <label for="name" class="col-sm-2 control-label item wid1">手机号：</label>
           <div class="col-sm-8 wid2">
               <input class="form-control " id = "comboIntroduce" value="${ Plan.contactWay }"/>
               <div id="errmsg"></div>
           </div>
       </div>
    
       <div class="form-group" id="divContent" >
           <label for="name" class="col-sm-2 control-label item wid1">套餐名称：</label>
           <div class="col-sm-8 wid2">
               <input class="form-control " id = "comboIntroduce" value="${ Plan.comboTitle }" >
               <div id="errmsg"></div>
           </div>
       </div>
       <div class="form-group" id="divContent" >
           <label for="name" class="col-sm-2 control-label item wid1">套餐类别：</label>
           <div class="col-sm-8 wid2">
               <input class="form-control " id = "comboIntroduce"  value= "${ Plan.tblName }"/>
               <div id="errmsg"></div>
           </div>
       </div>
       <div class="form-group" id="divContent" >
           <label for="name" class="col-sm-2 control-label item wid1">套餐详情：</label>
           <div class="col-sm-9 wid2">
               <textarea class="form-control " id = "tblIntroduce" name = "tblIntroduce" rows="3"style="display: none;" >${ Plan.tblIntroduce }</textarea>
             <!--style给定宽度可以影响编辑器的最终宽度-->
                <script type="text/plain" id="myEditor3"
                    style="width:480px;height:100px;"></script>
                <div id="errmsg"></div>
           </div>
       </div>
   
</form>


<script type="text/javascript" src="${ctx}/rs/js/bootstrapQ.min.js"></script>
<script src="${ctx}/rs/js/messages_zh.min.js"></script>
<script type="text/javascript">
    
    function divshow(obj){
        document.getElementById("myimage").src=obj.src; 
        var divpic = document.getElementById("showdiv");
        var ch = $("#showdiv").height();
           var cw = $("#showdiv").width();
          var x =300;
           var y = 450;
           var l,t;
           if(x>cw/2){
               //靠近右边
               l = x-300;
           }else{
               l = x;
           }
           if(y>ch/2){
               //靠近下边
               t = y-200;
           }else{
               t = y;
           }
           
           /* $("#showdiv").css({
               top:t,
               left:l
           }); */      
          divpic.style.display="block";
         
}
    function nonediv(){
        var divpic = document.getElementById("showdiv");
          divpic.style.display="none";
}  
    var ue3 = UE.getEditor('myEditor3');
    ue3.addListener('blur', function() {
        //失去焦点，做一次保存操作
        $("#tblIntroduce").val(ue3.getContent());
    });
    ue3.ready(function() {
        ue3.setContent('${ Plan.tblIntroduce }');
     });
</script>
</body>
</html>